﻿@model Whoever.Health.Website.Models.ContactViewModel

<h2>Contactos</h2>

<div class="row action-bar">
    @Action.Back()
    @Action.Create()
    @Action.FilterModal()
</div>

<!-- Button trigger modal -->


<!-- Modal -->
<div class="modal fade" id="filterModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                <h4 class="modal-title" id="myModalLabel">Filtrar</h4>
            </div>
            <div class="modal-body">
                @using (Html.BeginForm("Filter", "Contact", FormMethod.Get, new { id = "filter", @data_bind = "submit: viewModel.FilterList" }))
                {
                    <div class="row" data-bind="with: viewModel.Filter">
                        @Html.Partial("FilterPartial", Model)
                    </div>
                }
            </div>
            <div class="modal-footer">
                @Action.Filter()
            </div>
        </div>
    </div>
</div>

<div class="row" data-bind="with: viewModel.Entity">
    @Html.KOTemplateForEach(model => model.List)
</div>
